#pragma once
#include <iostream>
#include <unistd.h>
#include <functional>
#include"Log.hpp"
//2
using task_t = std::function<void()>;

void Download()
{
    std::cout<<"我是一个下载任务"<<std::endl;
    sleep(2);
}

//1.
class Task
{
public:
    Task() {}

    Task(int a, int b) : _a(a), _b(b)
    {
    }

    void Execute()
    {
        _result = _a + _b;
    }

    int A()
    {
        return _a;
    }

    int B()
    {
        return _b;
    }
    int Result()
    {
        return _result;
    }

private:
    int _a;
    int _b;
    int _result;
};